﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MailSortSettingViewModel.cs" company="DST Nexdox">
//   Copyright (c) DST Nexdox. All rights reserved.
// </copyright>
// <summary>
//   Defines the MailSortSettingViewModel type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DocProcessingWorkflow.Models.MailSortSetting
{
  using System;
  using System.ComponentModel.DataAnnotations;

  public class MailSortSettingViewModel
  {
    public MailSortSettingViewModel()
    {
    }

    public MailSortSettingViewModel(Entities.MailsortSetting mailSortSetting)
    {
      this.MailsortSettingID = mailSortSetting.MailsortSettingID;
      this.TNTDepot = mailSortSetting.TNTDepot;
      this.TNTMailingHouse = mailSortSetting.TNTMailingHouse;
      this.TNTClientCode = mailSortSetting.TNTClientCode;
      this.TNTJobReference = mailSortSetting.TNTJobReference;
      this.NexdoxMailsortService = mailSortSetting.nexdoxMailsortService;
      this.Largeletter = mailSortSetting.largeletter.HasValue && mailSortSetting.largeletter.Value;
      this.FixedWeight_NoOuter = mailSortSetting.FixedWeight_NoOuter;
    }

    public Int32 MailsortSettingID { get; set; }

    [StringLength(50)]
    public String TNTDepot { get; set; }

    [StringLength(50)]
    public String TNTMailingHouse { get; set; }

    [StringLength(50)]
    public String TNTClientCode { get; set; }

    [StringLength(50)]
    public String TNTJobReference { get; set; }

    [Required]
    [StringLength(50)]
    public String NexdoxMailsortService { get; set; }

    public Boolean Largeletter { get; set; }

    public Int32? FixedWeight_NoOuter { get; set; }
  }
}